import Vue from 'vue'
import Router from 'vue-router'
import Home from './views/Home.vue'

//导入底部导航模块
/* import HomeContainer from './components/tabbar/HomeContainer.vue'
import MemberContainer from './components/tabbar/MemberContainer.vue'
import ShopcarContainer from './components/tabbar/ShopcarContainer.vue'
import SearchContainer from './components/tabbar/SearchContainer.vue' */

Vue.use(Router)

export default new Router({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes: [
    {path: '/',redirect: '/home'},
    {path: '/home',component: () => import('./components/tabbar/HomeContainer.vue')},
    {path: '/member',component: () => import('./components/tabbar/MemberContainer.vue')},
    {path: '/shopcar',component: () => import('./components/tabbar/ShopcarContainer.vue')},
    {path: '/search',component: () => import('./components/tabbar/SearchContainer.vue')},
    {path: '/home/newslist',component: () => import('./components/news/NewsList.vue')},
    {path: '/home/newsinfo/:id',component: () => import('./components/news/newsinfo.vue')},
    {path: '/home/photolist',component: () => import('./components/photo/photolist.vue')},
    {path: '/home/photoinfo/:id',component: () => import('./components/photo/photoinfo.vue')},
    
    // {
    //   path: '/about',
    //   // route level code-splitting
    //   // this generates a separate chunk (about.[hash].js) for this route
    //   // which is lazy-loaded when the route is visited.
    //   component: () => import(/* webpackChunkName: "about" */ './views/About.vue')
    // }
  ],
  // 覆盖默认的路由高亮的类，默认的类叫做 router-link-active
  linkActiveClass:'mui-active'
})
